﻿using AnesSystem.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.CommonTables.SC.CDTY
{
    /// <summary>
    /// ZhiLiangPingGuCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class ZhiLiangPingGuCtrl : CustomCommonTableCtrl
    {
        public ZhiLiangPingGuCtrl()
        {
            InitializeComponent();
            int time = int.Parse(ExtensionMethods.getTimeSpan(DataManager.Instance.CurrentPatientLink.Status.MazuiStartTime, DataManager.Instance.CurrentPatientLink.Status.MazuiEndTime));
            sskssj.Text = (time/60!=0? time / 60+"时":"") + time % 60 + "分" ;
                
        }
        private void sssj_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;

            cusDatePicker.ShowDialog();

            if (cusDatePicker.Result)
            {
                sssj.Value = cusDatePicker.SelectedDateTime;//2005年11月5日
            }
        }
    }
}
